package GUI;

import Market.GenCo;
import Market.Market;
import sim.display.Console;
import sim.display.GUIState;
import sim.engine.SimState;
import sim.engine.Steppable;



public class AWEMGUI extends GUIState {
	
	private Market market;

	public AWEMGUI(SimState state) {
		super(state);
		market=(Market)state;
		setupModelUpdater();
	}

public void setupModelUpdater()
{
	GenCo gen =null;
  	for(int i=0; i<market.I; i++){
  		int id = i+1;		
  		 gen = market.genCoList.get("genco"+id); 
  		 gen.Switch = true;
 		 gen.day = market.D;
		this.scheduleImmediatelyAfter(gen);
  	}
}

 public static void main(String[] args){
	 
	 Market market = new Market(System.currentTimeMillis());       
     market.start();
	 AWEMGUI gui =new AWEMGUI(market);
	 Console c = new Console(gui);
	 c.setVisible(true);
     market.finish();
 }

}
